Mersenne Prime
A Mersenne prime is a prime number of the form
where \(n\) is a positive integer.
If \(a^n - 1\) is prime for some positive integers \(a, n\), then \(a = 2\) and \(n\) is prime.
This provides a necessary condition for the value of \(n\) in all Mersenne primes.
Proof
If \(a \geq 3\) then we have the following non-trivial factorisation:
This factorisation is non-trivial since \(a \geq 3 \implies a - 1 \geq 2\) and since \(n\) is a positive integer, \(a^{n - 1} + \dots + 1\) is at least \(1 + 1 = 2\).
Then, we will take \(a = 2\) and show the contrapositive, that \(n\) being composite implies that \(2^n - 1\) is composite. Noting that \(n = 1\) gives \(2^n - 1\) which is not prime.
Let \(n = sr\) where \(s, r \geq 2\), then we have the factorisation:
where since \(r \geq 2\), neither term is trivial.